#include "modify_dialog.h"
#include "ui_modify_dialog.h"
#include <QDebug>
Modify_Dialog::Modify_Dialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::Modify_Dialog)
{
    ui->setupUi(this);

}

void Modify_Dialog::get_word(QString word)
{
    word_user = word;
    qDebug() << word_user;
    ui->label_word->setText(word_user);
}

Modify_Dialog::~Modify_Dialog()
{
    delete ui;
}

void Modify_Dialog::on_pushButton_yes_clicked()
{

    QString pronunciations = ui->lineEdit_pronunciation->text();
    QString meaning = ui->lineEdit__meaning->text();

    emit(sendModify_Slot(word_user,pronunciations,meaning));
    close();
}

void Modify_Dialog::on_pushButton_no_clicked()
{
    close();
}
